priority node of the plugin data structure is incomplete.
As of BOSS v3, the metadata file syntax is what BOSS's masterlists and userlists are written in. If you know YAML, good news: the metadata file syntax is essentially just YAML 1.2. If you don't know YAML, then its Wikipedia page is a good introduction. All you really need to know is:
Some important points that are more specific to how BOSS uses YAML:
-?:,[]{}#&*!|>"%@`, unless they also contain any single quotes, in which case the string should be enclosed in double quotes instead. Any backslashes or double quotes within a double-quoted string should be escaped with a backslash, ie. " → \" and \ → \\.
These docs give all example syntax in YAML's least compact representation: you can also use a more compact representation, but it's better for the masterlist to be readable than compact.
Some properties of file paths as used by BOSS:
../../.
Meshes\\Resources(1|2)\\(upperclass)?table.nif, BOSS will look for a file named table.nif or upperclasstable.nif in the Meshes\Resources(1|2) folder, rather than looking in the Meshes\Resources1 and Meshes\Resources2 folders.
Please test any changes you make before uploading them. One way of doing this is to run BOSS, another is to copy/paste what you've changed into an online parser such as this one, though it won't catch condition syntax errors or non-syntax errors such as having the same file both required and incompatible.
The root of a metadata file is a key-value map. BOSS will recognise the following keys, none of which are required:
| Key Name | Value Type | Notes |
|---|---|---|
globals | message list | A list of message data structures for messages that are displayed independently of any plugin. |
plugins | plugin list | A list of plugin data structures, holding all the plugin metadata within the file. |
Other keys may also be present, but are not processed by BOSS. The message and plugin data structures are detailed in the next section.
An example metadata file:
globals:
- type: say
content: You are using the latest version of BOSS.
condition: 'version("BOSS", "3.0.0.0", ==)'
plugins:
- name: Armamentarium.esm
tag:
- Relev
- name: ArmamentariumFran.esm
tag:
- Relev
- name: 'Beautiful People 2ch-Ed.esm'
tag:
- Eyes
- Graphics
- Hair
- R.Relations
While you could write whatever you wanted in a metadata file without problems, so long as it was valid YAML, it would be pointless as BOSS expects the metadata to be laid out using a certain set of data structures, described in this section.
BOSS metadata files can contain suggestions for the addition or removal of Bash Tags, and this is the structure used for them. It has two forms: the first is a simple string, and the second is a key-value map. All values in the map are strings.
The simple form:
tag
where tag is the Bash Tag, preceded by a minus sign if it is suggested for removal.
The map form:
| Key Name | Required | Notes |
|---|---|---|
name | ✓ | A Bash Tag, preceded by a minus sign if it is suggested for removal. |
condition | ✗ | A condition string that is evaluated to determine whether this Bash Tag should be suggested: if it evaluates to true, the Tag is suggested, otherwise it is ignored. See Condition Strings for details. |
Examples:
Relations
or
name: -Relations
condition: "file(\"Mart's Monster Mod for OOO.esm\") or file(\"FCOM_Convergence.esm\")"
Not to be confused with the structure of the metadata file itself, this structure can be used to hold filenames. It has two forms: the first is a simple string, and the second is a key-value map. All values in the map are strings.
The simple form:
filepath
where filepath is a file path relative to the game's Data folder.
The map form:
| Key Name | Required | Notes |
|---|---|---|
name | ✓ | A file path or name. |
display | ✗ | A substitute string to be displayed instead of the file path in any generated messages, eg. the name of the mod the file belongs to. |
condition | ✗ | A condition string that is evaluated to determine whether this file data should be used: if it evaluates to true, the data is used, otherwise it is ignored. See Condition Strings for details. |
Examples:
../obse_loader.exe
or
name: ../obse_loader.exe
condition: 'version("../obse_loader.exe", "0.0.18.0", >=)'
display: OBSE v18+
Messages are given as key-value maps.
| Key Name | Required | Notes |
|---|---|---|
type | ✓ | The type string can be one of three keywords, see the table below for their semantics. |
content | ✓ | Either simply a string, or a list of content data structures. If the latter, one of the structures must be for English. |
condition | ✗ | A condition string that is evaluated to determine whether the message should be displayed: if it evaluates to true, the message is displayed, otherwise it is not. See Condition Strings for details. |
There are three message types:
| Keyword | Description |
|---|---|
say | A generic message, useful for miscellaneous notes. |
warn | A warning message, describing a non-critical issue with the user's mods (eg. dirty mods). |
error | An error message, decribing a critical installation issue (eg. missing masters). |
The content data structure is a key-value map, with all values being strings:
| Key Name | Required | Notes |
|---|---|---|
str | ✓ | The actual message content string. URLs in message content strings will be turned into hyperlinks in BOSS's user interface. Recognised URLs are those that start with file:, http: or https:. URLs can be labelled by writing the label after the URL, with a space separating them, and enclosing the URL and label in double quotes.
|
lang | ✓ | The language that str is written in, given as an ISO 639-3 language code. The languages BOSS supports are given in Language Codes.
|
BOSS handles messages and languages as follows:
content value is a string, the message will use the string as its content if displayed.
content value is a list of content structures, then the first structure with a language that matches BOSS's current language will be used as the message's content if displayed. If there are no matches, then the first structure in English will be used.
Examples (translations by Google):
type: say
condition: file("foo.esp")
content:
- lang: eng
str: 'An example link: http://www.example.com'
- lang: rus
str: 'Это пример ссылки: http://www.example.com'
- lang: ger
str: 'Ein Beispiel-Link: http://www.example.com'
would be displayed as
отмечать: Это пример ссылки: http://www.example.comif the current language was Russian and
foo.esp was installed, while
type: say
content: An alternative "http://www.example.com example link", with no translations.
would be displayed as
отмечать: An alternative example link, with no translations.
This is the structure that brings all the others together, and forms the main component of a metadata file. It is a key-value map.
| Key Name | Data Type | Required | Notes |
|---|---|---|---|
name | string | ✓ | Can be an exact plugin filename or a regular expression plugin filename. If the period that precedes the file extension has been escaped (eg. \.esp, \.esm), the string is treated as a regular expression, otherwise it is treated as an exact filename.
|
enabled | boolean | ✗ | Enables or disables use of the plugin object. Used for user rules, but no reason to use it in the masterlist. If unspecified, defaults to true.
|
priority | integer | ✗ | Relative position of plugin to others that change one or more of the same records. Values less than zero cause the plugin to be loaded higher, values greater than zero cause the plugin to be loaded lower. If unspecified, defaults to 0.
|
after | file list | ✗ | An unordered list of plugins that this plugin must load after, but which are not dependencies. Used for resolving specific compatibility issues and by user rules for specifying custom plugin positions. |
req | file list | ✗ | An unordered list of files that this plugin requires to be present. If any of these files are missing, an error message will be displayed. Intended for use specifying implicit dependencies, as BOSS will detect a plugin's explicit masters itself. |
inc | file list | ✗ | An unordered list of files that this plugin is incompatible with. If any of these files are present, an error message will be displayed. |
msg | message list | ✗ | The messages attached to this plugin. The messages will be displayed in the order that they are listed. |
tag | tag list | ✗ | An unordered list of Bash Tags suggested for this plugin. If a Bash Tag is suggested for both addition and removal, the latter will override the former when the list is evaluated. |
Example:
name: "Oscuro's_Oblivion_Overhaul.esm"
tag:
- Actors.Spells
- Graphics
- Invent
- Relations
- Scripts
- Stats
- name: -Relations
condition: "file(\"Mart's Monster Mod for OOO.esm\") or file(\"FCOM_Convergence.esm\")"
msg:
- type: say
content: 'Do not clean. "Dirty" edits are intentional and required for the mod to function.'
Condition strings can be used to ensure that data is only acted on by BOSS under certain circumstances. They are very similar to boolean conditional expressions in programming languages such as Python, though more limited. Their EBNF grammar is:
[ negator ], function, { junctor, [ negator ], function } ;
The [ negator ], function grammar is referred to as a condition, and two conditions joined by an operator, ie. condition, operator, condition is referred to as a compound condition.
Unlike previous versions of BOSS, BOSS v3 caches the results of condition evaluations, so performance is not really an issue. A regular expression check will still take longer than a file check though, so use the former only when appropriate to do so.
There are several conditions that can be tested for using the functions detailed in the table below.
| Function | Syntax | Description |
|---|---|---|
| File | file("filepath") | Returns true if filepath is installed, false otherwise. |
| File | regex("regex") | Returns true if a file matching regex is found, false otherwise. |
| Checksum | checksum("filepath", checksum) | Returns true if the calculated checksum of filepath matches checksum, false otherwise. If filepath does not exist, returns false. |
| Version | version("filepath", "version", comparator) | Returns true if the boolean expression (actual version of filepath) comparator version holds true, false otherwise. If filepath does not exist and comparator is ==, > or >=, returns false. If filepath does not exist and comparator is !=, < or <=, returns true.
|
| Plugin Active Status | active("filepath") | Returns true if filepath is a .esp or .esm file that is both installed and active, false otherwise.
|
The different types of variable used in the above functions are described in more detail below.
| Variable Type | Description |
|---|---|
filepath | A Windows file path, or BOSS, which references the BOSS executable being run.
|
regex | A regular expression string to match file paths to. |
checksum | A string of hexadecimal digits representing an unsigned integer that is the data checksum of a file. BOSS displays the checksums of plugins in its user interface after running. |
version | A string of characters representing the version of a plugin or executable. BOSS displays the versions of plugins in its user interface after running. |
comparator | A comparison operator, ie. one of ==, !=, <, >, <= or >=, meaning "is equal to", "is not equal to", "is less than", "is greater than", "is less than or equal to" and "is greater than or equal to" respectively.
|
The negator, or logical negation operator, inverts the value of the function that follows it. Its inclusion is optional, and its syntax is simply:
not
Below is a truth table for the negator.
Value of function | Value of not function
|
|---|---|
| false | true |
| true | false |
There are two supported junctors, the logical conjunction (logical and
operator) and the logical disjunction (logical or
operator), that operate on the expressions to their left and right.
| Junctor | Syntax | Description |
|---|---|---|
| Logical Conjunction | and | Both conditions must evaluate to true for the compound condition to evaluate to true. If not, the compound condition evaluates to false. |
| Logical Disjunction | or | One condition or both conditions must evaluate to true for the compound condition to evaluate to true. If neither condition is true, then the compound condition evaluates to false. |
The following is a truth table for the junctors:
Value of condition1 | Value of condition2 | Value of condition1 and condition2 | Value of condition1 or condition2
|
|---|---|---|---|
| true | true | true | true |
| true | false | false | true |
| false | true | false | true |
| false | false | false | false |
When a condition string is evaluated, its constituent parts are evaluated according to the standard precedence rules of operator logic, ie.
and
or
Below is a table that lists some combinations of conditions, showing for each the order of evaluation by explicit bracketing. To make it easier to read, the negator function pair is shortened to C after the first example.
| String Structure | Evaluated As |
|---|---|
negator function | ( negator ( function ) )
|
C and C | ( C and C )
|
C or C | ( C or C )
|
C and C and C | ( ( C and C ) and C )
|
C or C or C | ( ( C or C ) or C )
|
C and C or C | ( ( C and C ) or C )
|
C or C and C | ( C or ( C and C ) )
|
C and C and C and C | ( ( ( C and C ) and C ) and C )
|
C and C and C or C | ( ( ( C and C ) and C ) or C )
|
C and C or C and C | ( ( C and C ) or ( C and C ) )
|
C and C or C or C | ( ( ( C and C ) or C ) or C)
|
C or C or C or C | ( ( ( C or C ) or C ) or C )
|
C or C or C and C | ( ( C or C ) or ( C and C ) )
|
C or C and C or C | ( ( C or ( C and C ) ) or C )
|
C or C and C and C | ( C or ( ( C and C ) and C ) )
|
You can also explicitly enclose any condition in brackets to override the evaluation order, eg. C and ( C or C ) is evaluated as C and ( C or C ), in contrast to the unbracketed string above.
BOSS supports the following languages and language codes:
| Language | ISO 639-3 Code |
|---|---|
| English | eng |
| Spanish | spa |
| Russian | rus |
This document is part of the BOSS documentation.
Copyright (C) 2012–2013 WrinklyNinja
See the file BOSS ReadMe.html
for copying conditions.